
PROGRAM=eduMovil.exe
OBJ_DIR := bin
BIN_DIR := bin
SRC := extra/main.cpp extra/util.cpp extra/Wire.cpp lib/rtc.cpp lib/menu.cpp extra/LiquidCrystal.cpp lib/acciones.cpp
VPATH := $(sort  $(dir $(SRC)))
CFLAGS := -I. -Iextra -Ilib
LFLAGS := 
OBJS := $(patsubst %.cpp, $(OBJ_DIR)/%$(ARCH)$(DEBUG).o, $(notdir $(SRC)))

$(BIN_DIR)/$(PROGRAM): $(OBJS)
	@echo building output ...
	$(CXX) -o $(BIN_DIR)/$(PROGRAM) $(OBJS) $(LFLAGS)
	
#%.o:%.cpp
#	g++ -c $< $(INCLUDES)

$(OBJ_DIR)/%$(ARCH)$(DEBUG).o : %.cpp Makefile commonArduino.inc edumovil.ino
	@echo creating $@ ...
	$(CXX) $(CFLAGS) -c -o $@ $<        
        
clean:
	rm -f $(OBJ_DIR)/*.o $(OBJ_DIR)/*.exe
